# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: François Charette <firmicus ατ gmx δοτ net>

pkgname=perl-dbd-pg
pkgver=3.17.0
pkgrel=1
pkgdesc="Postgres Driver for DBI"
arch=('loong64' 'x86_64')
url="https://search.cpan.org/dist/DBD-Pg"
license=('GPL' 'PerlArtistic')
depends=('perl-dbi>=1.52' 'postgresql-libs')
options=('!emptydirs')
source=("https://www.cpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-${pkgver}.tar.gz")
sha512sums=('17e7946297c58c19aa0f069ed9e1a78022ca64f76f25d7122f08b255d5192057ccfb7ace2530b505823c540f10733c3b26c1fe24a92cee966ba724e5d1694fb1')

build() {
  cd  DBD-Pg-${pkgver}
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  DBD-Pg-${pkgver}
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
